Troubleshooting
iOS
Build fails: libarclite not found (Xcode 16.2)
Error message
clang++: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode_16.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a'; try increasing the minimum deployment target
Cause
- Xcode toolchain no longer ships
libarclite
for deployment targets below iOS 13.
Solution
- In Xcode, select your app target.
- Open the General tab.
- Set Minimum Deployment to iOS 13.0 (or higher).
Linker error: Undefined symbol x3mads::XMediatorAds / CocoaPods warnings overriding settings
Symptoms
-
Error message:
Undefined symbol: x3mads::XMediatorAds
-
And/or CocoaPods install warnings like:
[!] The `<YourTarget> [Debug]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting...
[!] The `<YourTarget> [Debug]` target overrides the `LIBRARY_SEARCH_PATHS` build setting...
[!] The `<YourTarget> [Debug]` target overrides the `OTHER_LDFLAGS` build setting...
Cause
- The target overrides CocoaPods-managed build settings, preventing proper linkage of Pods (including the X3M SDK components).
Solution
- In Xcode, select your app target and open Build Settings.
- For the following settings, ensure
$(inherited)
is present (do not remove existing values):- OTHER_LDFLAGS
- LIBRARY_SEARCH_PATHS
- GCC_PREPROCESSOR_DEFINITIONS
- In your iOS project directory, run
pod install
to regenerate the workspace with the inherited settings. - Clean build folder (Product > Clean Build Folder) and rebuild.
After running pod install
, verify that the CocoaPods warnings about overridden build settings no longer appear in the install output.
Linker errors: MediaPlayer / GameController symbols not found
Error messages
Undefined symbol: _GCControllerDidConnectNotification
Undefined symbol: _GCControllerDidDisconnectNotification
Undefined symbol: _MPMoviePlayerPlaybackDidFinishNotification
Undefined symbol: _MPMoviePlayerPlaybackStateDidChangeNotification
Undefined symbol: _OBJC_CLASS_$_MPMoviePlayerController
Cause
- Required Apple frameworks are not linked in the target.
Solution
- In Xcode, select your app target > Build Phases.
- Expand Link Binary With Libraries.
- Add the following frameworks:
- MediaPlayer.framework
- GameController.framework
- Rebuild the project.
Android
Build compatibility (AGP/Gradle)
Some build toolchains ship older Android Gradle Plugin (AGP) and Gradle versions that are incompatible with the latest versions of Google Mobile Ads and other networks.
Use the steps below to update your Android project to a compatible toolchain.
Manually update Gradle
Prerequisites Before continuing, ensure you have the following:
- Download and install the latest stable version of Android Studio.
- Optional: For details on building for Android, see Java versions in Android builds
Steps:
-
Use JDK 17 or later
In Android Studio, set Gradle JDK to 17 or newer (File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK). Install if missing.
-
Target SDK 34+
Ensure your app module targets API Level 34 or higher.
- app/build.gradle
- app/build.gradle.kts
android {
compileSdk 34
defaultConfig {
targetSdk 34
}
}android {
compileSdk = 34
defaultConfig {
targetSdk = 34
}
} -
Update the project-level build.gradle to AGP 8.1.1+
plugins {
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
} -
Update
/gradle/gradle-wrapper.properties
to Gradle 8.1.1+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
-
Sync and rebuild
Sync Gradle and rebuild your project from Android Studio.
Crash related to PreferenceDataStoreDelegateKt
When building with older Android Gradle Plugin versions, you might encounter the following crash at runtime:
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.datastore.preferences.PreferenceDataStoreDelegateKt"
Cause
This issue occurs due to an incompatibility with the Android Gradle Plugin (AGP) version in your build. The SDK relies on AndroidX DataStore components which require a newer version of AGP.
Solution
You have two options to resolve this issue:
-
Update Android Gradle Plugin (Recommended)
Update AGP to 8.1.1 or higher (Android Studio will guide the upgrade if available for your Gradle version).
-
Manually update Gradle/AGP
Follow the steps in the Manually update Gradle section above to update AGP and the Gradle wrapper.